#include "otherWnd.h"
#include <hgesprite.h>
#include "HGEDevice.h"
otherWnd::otherWnd(QWidget* pParent)
:QWidget( pParent ),m_bShowFirst(false)
{
	HTEXTURE m_Texture = g_pDevice->Texture_Load( "akuma1.png" );
	m_pSprite = new hgeSprite( m_Texture, 0, 0, 204, 244 );


	HTEXTURE m_Texture2 = g_pDevice->Texture_Load( "pngshow.png" );
	m_pSprite2 = new hgeSprite( m_Texture2, 0, 0, 15, 15 );
	setAttribute(Qt::WA_PaintOnScreen);
}

otherWnd::~otherWnd(void)
{
}

void otherWnd::paintEvent( QPaintEvent* )
{
	g_pDevice->Gfx_BeginScene();

	if( m_bShowFirst )
	{
		m_pSprite->Render(0,0);
		m_pSprite2->Render(0,0);
	}
	else
	{
		m_pSprite2->Render(0,0);
		m_pSprite->Render(0,0);
	}

	g_pDevice->Gfx_EndScene(winId());
}

QPaintEngine* otherWnd::paintEngine() const
{
	return NULL;
}